package com.xindong.paking.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author jielun
 * @since 2023-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_order")
public class TbOrder implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键id
     */
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单开启时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy年MM月dd日 HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @TableField("start_time")
    private LocalDateTime startTime;

    /**
     * 订单结束时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy年MM月dd日 HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 车牌号
     */
    @TableField("car_number")
    private String carNumber;

    /**
     * 所属车位id
     */
    @TableField("position_id")
    private Integer positionId;

    /**
     * 所属停车场id
     */
    @TableField("parking_id")
    private Integer parkingId;

    /**
     * 支付状态（1：车辆尚未离开、2：未支付、3：已经支付）
     */
    @TableField("status")
    private Integer status;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 支付金额
     */
    @TableField("money")
    private Float money;

    /**
     * 优惠券所属id
     */
    @TableField("discount_id")
    private Integer discountId;


}
